New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minimal changes to produce passing travis build #142
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add proposal for 3e
…her than call "dplyr::select" directly
…ion knitr:::sans_ext
Awesome, thanks @djnavarro! |
This was referenced Jun 15, 2019
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This aim here is to allow the ggplot2 book to build cleanly on travis. It still uses
oldbookdown
and makes almost no changes to any R code shown in the book (the only exceptions being those caused by changes to theUSAboundaries
andscales
packages since publication of the 2nd edition).changes that alter the code (or output) shown to reader
The back transformation example in position.rmd produces several pages of warnings about
NaN
values. These are now suppressed in the knitr chunk on line 446In scales.Rmd there are a couple of cases where the interface to
scales::unit_format()
etc has changed, so the arguments toscales::unit_format()
andscales::dollar_format()
are now named explicitly (I think the dollar one may be unnecessary)palette names in the
wesanderson
package have changes since second edition to the book. These are all updated now (e.g. Zissou is now Zissou1).The
USAboundaries
package has changed in two respects since ggplot2 2nd ed: it now generates an sf object, and the underlying data is in theUSAboundariesData
package on ropensci. Lines 685-687 of toolbox.rmd make minimal changes to the R code in the book.changes that manage dependencies etc
The DESCRIPTION file lists new package dependencies (mostly linked to the dependency on the
sf
package), and travis.yml includes lines for sources, repos and packages needed to build sf on travis.The existing source produces odd method dispatch for
select
. Rather than edit the code in the book, I've usedconflicted::conflict_prefer()
to manage this in the common.R script, explicitly preferringdplyr::select()
. (Ditto fortidyr::extract()
)In the render-tex.R file, I've added a dummy version of the
tex_chapter()
function that mirrorsoldbookdown::tex_chapter()
but now uses"--top-level-division=chapter"
as an argument to pandoc. (Presumably this will be irrelevant when moving to new bookdown)In ggplot2-book.tex, I've defined commands for
OperatorTok
andControlFlowTok
. The inserted commands don't do anything, but the .tex files generated by current version of pandoc now include thoseThe common.R script now calls
tools::file_path_sans_ext()
in place of the (now deleted) internalknitr:::sans_ext()
function.miscellaneous
for no particularly good reason the repository is reset to the "clean" state so the generated tex files for each chapter are deleted.
travis log for the current build: https://travis-ci.org/djnavarro/ggplot2-book/jobs/545943102
I'm still learning the etiquette of making a PR. My apologies in advance if something is awry!
just in case :-) "I assign the copyright of this contribution to Hadley Wickham"